package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.SocCheckAddDTO;
import org.jsola.hr.dto.SocCheckUpdateDTO;
import org.jsola.hr.query.SocCheckCustomQuery;
import org.jsola.hr.query.SocCheckQuery;
import org.jsola.hr.vo.SocCheckListVO;
import org.jsola.hr.vo.SocCheckParseImportListVO;
import org.jsola.hr.vo.SocCheckVO;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.Valid;
import java.util.List;

/**
 * 社保校验表
 *
 * @author zhr
 */
@Api(tags = "hr-社保校验表")
public interface ISocCheckControllerAPI {

    /**
     * 新增社保校验表
     *
     * @param socCheckAddDTO 社保校验表新增实体
     * @return 社保校验表展示对象
     */
    @ApiOperation(value = "新增社保校验表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socCheckAddDTO", dataType = "SocCheckAddDTO", value = "新增社保校验表", paramType = "body")
    })
    Result<SocCheckVO> save(SocCheckAddDTO socCheckAddDTO);


    /**
     * 修改社保校验表
     *
     * @param socCheckUpdateDTO 社保校验表
     * @return 更新数量
     */
    @ApiOperation(value = "修改社保校验表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socCheckUpdateDTO", dataType = "SocCheckUpdateDTO", value = "修改社保校验表", paramType = "body")
    })
    Result<Integer> update(SocCheckUpdateDTO socCheckUpdateDTO);


    /**
     * 删除单个社保校验表，彻底删除
     *
     * @param socCheckId 社保校验表id
     * @return 删除数量
     */
    @ApiOperation(value = "删除单个社保校验表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socCheckId", dataType = "String", value = "社保校验表id", paramType = "path")
    })
    Result<Integer> delete(String socCheckId);


    /**
     * 批量删除社保校验表，彻底删除
     *
     * @param socCheckIds 社保校验表id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除社保校验表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socCheckIds", dataType = "String[]", value = "社保校验表id数组", paramType = "body", allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] socCheckIds);


    /**
     * 根据社保校验表id查询社保校验表详情
     *
     * @param socCheckId 社保校验表id
     * @return 社保校验表详情
     */
    @ApiOperation(value = "根据社保校验表id查询社保校验表详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socCheckId", dataType = "String", value = "社保校验表id", paramType = "path")
    })
    Result<SocCheckVO> findById(String socCheckId);


    /**
     * 查询社保校验表
     *
     * @param socCheckQuery 社保校验表查询参数
     * @return page
     */
    @ApiOperation(value = "查询社保校验表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socCheckQuery", dataType = "SocCheckQuery", value = "社保校验表查询参数", paramType = "query")
    })
    Result<List<SocCheckListVO>> listAll(SocCheckQuery socCheckQuery);


    /**
     * 分页查询社保校验表
     *
     * @param socCheckQuery 社保校验表查询参数
     * @return page
     */
    @ApiOperation(value = "分页查询社保校验表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socCheckQuery", dataType = "SocCheckQuery", value = "社保校验表查询参数", paramType = "query")
    })
    Result<Page<SocCheckListVO>> page(SocCheckQuery socCheckQuery);

    /**
     * 根据校验类型和参保月Id分页查询检验数据
     *
     * @param socCheckCustomQuery 查询参数
     * @return 校验数据
     */
    @ApiOperation(value = "根据校验类型和参保月Id分页查询检验数据")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socCheckCustomQuery", dataType = "SocCheckCustomQuery", value = "查询参数", paramType = "query")
    })
    Result<Page<SocCheckVO>> pageByMonthIdAndCheckType(SocCheckCustomQuery socCheckCustomQuery);

    /**
     * 解析导入文件
     *
     * @param file 文件
     * @return 解析结果
     */
    @ApiOperation(value = "解析导入文件")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "file",
                    value = "文件，Content-Type需要设置为multipart/form-data",
                    paramType = "form")
    })
    Result<List<SocCheckParseImportListVO>> parseImport(MultipartFile file);

    /**
     * 社保校验Excel入库
     *
     * @param file           文件
     * @param socCheckAddDTO 保存参数
     * @return 解析结果
     */
    @ApiOperation(value = "社保校验Excel入库")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "file", value = "文件，Content-Type需要设置为multipart/form-data", paramType = "form"),
            @ApiImplicitParam(name = "socCheckAddDTO", dataType = "SocCheckAddDTO", value = "保存参数", paramType = "query")
    })
    Result<List<SocCheckParseImportListVO>> saveImport(MultipartFile file, SocCheckAddDTO socCheckAddDTO);

    /**
     * 社保校验,官方网站校验
     *
     * @param socCheckCustomQuery 校验参数
     * @return 校验结果
     */
    @ApiOperation(value = "社保校验,官方网站校验")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socCheckCustomQuery", value = "SocCheckCustomQuery", paramType = "body")
    })
    Result<String> checkWebSiteDate(SocCheckCustomQuery socCheckCustomQuery);

}

